package com.jurenzhao.partssystem.system.system_log.service;

import com.jurenzhao.partssystem.system.system_log.dao.System_LogMapper;
import com.jurenzhao.partssystem.system.system_log.entity.System_Log;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LogService {

    @Resource
    private System_LogMapper logMapper;



    //添加
    public boolean insert(System_Log log){
        return logMapper.insert(log)>0;
    }

    //删除
    public int delete(int id) {
        return logMapper.deleteByPrimaryKey(id);
    }
        //更新

    public Boolean update(System_Log logid) {
        return logMapper.updateByPrimaryKeySelective(logid) > 0;
    }
//根据ID查询
    public System_Log findById(int id){
    return logMapper.selectByPrimaryKey(id);
    }

    //查询所有
    public List<System_Log> findAll(){
        return logMapper.findAll();
    }

    public List<System_Log> findByType() {
        return logMapper.findnByType();
    }
}







